package spring.code;

import org.springframework.core.io.ClassPathResource;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @Auther DRevelation
 * @Date 2020-05-13 下午 15:07
 * @Desc
 */
public class ResourceFileDemo {
    public static void main(String[] args) {
        BufferedReader br;
        try {
            br = new BufferedReader(new InputStreamReader(new ClassPathResource("application.properties").getInputStream()));
            String line;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

        File file = new File("D:\\jenkins.war");
        System.out.println("file.length() = " + (double) file.length() /(1024*1024));
        System.out.println(""==null);
    }
}
